<style>
#KampanjeAdmin table tr.head{
	cursor:default;
}
#KampanjeAdmin table tr{
	cursor:pointer;
}
#KampanjeAdmin table tr.selected,
#KampanjeAdmin table tr:hover{
	background:{{$highlight}};
	color:{{$highlighttext}};
}
#KampanjeAdmin table tr td input{
	background-color:#fff;
	border:1px solid #000;
	width:20px;
	height:20px;
	padding:0px;
	background-position:center center;
	cursor:pointer;
	position:absolute;
	display:none;
}
#KampanjeAdmin table tr:hover td input{
	display:block;
}
#KampanjaAdminEdit{
	margin-left:2px;
	display:none;
	float:left;
}
#KampanjaAdminEdit a.close{
	width:12px;
	height:12px;
	overflow:hidden;
	float:left;
	margin-left:-12px;
}
#KampanjaAdminEdit a.close img{
	border:none;
}
#KampanjaAdminEdit form{
	width:300px;
}
#KampanjaAdminEdit label{
	width:90px;
}
#KampanjaAdminEdit label[for=edit_kampanja_name]{
	width:auto;
}
#KampanjaAdminEdit input[name=edit_kampanja_name]{
	width:250px;
}
#KampanjaAdminEdit input[type=submit]{
	float:right;
}
</style>
<div id="KampanjeAdmin">
	<div class="area">
		<h1>Kampanje</h1>
		<input type="button" value="osveži" class="refresh" onclick="LoadRSDoc('kampanje.php','setContent')" />
		<input type="button" value="nova kampanja" class="novi" onclick="KampanjaNew()" />
		<br clear="all" />
		<table>
			<tr class="head" align="center">
				<td>šifra</td>
				<td>naziv</td>
				<td>datum početka</td>
				<td>datum isteka</td>
			</tr>
			{{%loop start kampanja_id}}
			<tr onclick="KampanjaEdit(this)" kampanjaid="{{$kampanja_id}}" kampanjaname="{{$kampanja_name}}" kampanjastart="{{$kampanja_start}}" kampanjaend="{{$kampanja_end}}">
				<td>
					<input type="button" class="delete" onclick="if(confirm('Potvrdite brisanje kampanje {{$kampanja_name}}')){LoadRSDoc('kampanje.php?a=delete&id={{$kampanja_id}}','afterKampanjaDelete');} event.stopPropagation();" title="delete" />
					{{$kampanja_id}}
				</td>
				<td>{{$kampanja_name}}</td>
				<td align="center">{{$kampanja_start}}</td>
				<td align="center">{{$kampanja_end}}</td>
			</tr>
			{{%loop end}}
		</table>
	</div>
	<div id="KampanjaAdminEdit">
		<form class="area" method="post" action="javascript:void(0)" onsubmit="submitForm(this,'kampanje.php','POST','afterKampanjaNew',1)" id="KampanjaAdminEditForm">
			<input type="hidden" name="a" value="new" />
			
			<input type="hidden" name="edit_kampanja_id" value="" />
			
			<label class="left" for="edit_kampanja_name">Naziv:</label>
			<input type="text" name="edit_kampanja_name" id="edit_kampanja_name" value="" />

			<br clear="all" />
			<label class="left" for="edit_kampanja_start">Datum početka:</label>
			<input type="text" class="dateInput" name="edit_kampanja_start" id="edit_kampanja_start" value="" />
			<input type="button" class="datePicker" onclick="displayDatePicker('edit_kampanja_start',this)" />
			
			<br clear="all" />
			<label class="left" for="edit_kampanja_end">Datum isteka:</label>
			<input type="text" class="dateInput" name="edit_kampanja_end" id="edit_kampanja_end" value="" />
			<input type="button" class="datePicker" onclick="displayDatePicker('edit_kampanja_end',this)" />
			
			<br clear="all" />
			<input type="submit" class="save" value="sačuvaj" />
		</form>
		<a class="close" href="javascript:void(0)" onclick="this.parentNode.style.display='none'" title="close"><img src="gui/close_12.gif" /></a>
	</div>
</div>